/* Message Renderer 样式 */

/* 确保Font Awesome图标正确显示 */
@import url('');

/* 消息详情应用容器 */
.message-detail-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
  position: relative;
}

/* 消息详情头部 - 已废弃，使用主框架的app-header代替 */
/*
.message-detail-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.message-detail-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.back-to-list-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-to-list-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.message-actions {
    display: flex;
    gap: 8px;
}

.refresh-messages-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.refresh-messages-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.refresh-messages-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
*/

/* 消息详情内容区域 */
.message-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 5px; /* 减少padding，使消息更紧凑 */
  padding-bottom: 120px; /* 为固定的footer留出空间 */
  display: flex;
  flex-direction: column; /* 垂直排列消息 */
  /* 确保滚动条样式美观 */
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

/* 为message-detail-content添加滚动条样式 */
.message-detail-content::-webkit-scrollbar {
  width: 6px;
}

.message-detail-content::-webkit-scrollbar-track {
  background: transparent;
}

.message-detail-content::-webkit-scrollbar-thumb {
  background-color: #ddd;
  border-radius: 3px;
}

.message-detail-content::-webkit-scrollbar-thumb:hover {
  background-color: #bbb;
}

.messages-container {
  max-height: 100%;
  overflow: visible; /* 改为visible，不需要滚动 */
  padding: 5px 0; /* 减少上下padding，使消息更紧凑 */
  display: flex;
  flex-direction: column; /* 垂直排列消息 */
}

/* 单条消息样式 */
.message-detail {
  display: flex;
  margin: 4px 0 !important; /* 强制设置上下边距为4px */
  padding: 0;
  border-radius: 15px;
  max-width: 88%;
  position: relative;
  animation: messageSlideIn 0.3s ease-out;
}

/* 附件消息需要更大的宽度来显示图片 */
.message-detail[title='附件'] {
  max-width: 85% !important;
}

.message-detail[title='图片'] {
  max-width: 85% !important;
}

.message-detail.message-sent {
  color: white;
  margin: 8px 0 !important; /* 增加用户消息的上下间距到8px */
  margin-left: auto;
  margin-right: 0; /* 确保完全靠右 */
  flex-direction: row-reverse;
  align-self: flex-end; /* 确保在容器中靠右对齐 */
}

/* 确保连续的用户消息之间有正确的间距 */
.message-detail.message-sent + .message-detail.message-sent {
  margin-top: 8px !important; /* 连续用户消息之间的间距 */
}

.message-detail.message-received {
  color: #333;
  flex-direction: column; /* 改为垂直布局，以便将sender放在头像上方 */
  align-items: flex-start; /* 左对齐 */
  align-self: flex-start; /* 确保在容器中靠左对齐 */
}

/* 为接收消息创建一个包含头像和内容的水平容器 */
.message-detail.message-received .message-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  margin-top: 2px; /* 在sender和body之间添加小间距 */
}

.message-avatar {
  width: 40px !important; /* 强制设置为40px，不受scale影响 */
  height: 40px !important;
  min-width: 40px !important; /* 防止被压缩 */
  max-width: 40px !important; /* 防止被放大 */
  min-height: 40px !important;
  max-height: 40px !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 10px;
  flex-shrink: 0;
}

.message-sent .message-avatar {
}

.message-received .message-avatar {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.message-content {
  flex: unset !important;
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px; /* 从5px减少到3px，使元信息与消息文本间距更紧凑 */
  font-size: 12px;
  opacity: 0.8;
}

.message-sender {
  font-weight: 600;
}

/* 将message-sender移动到头像上方 */
.message-detail.message-received .message-sender {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  margin-left: 10px; /* 与头像左边距对齐 */
  order: -1; /* 确保显示在最上方 */
}

.message-time {
  color: #777;
  opacity: 0.7;
}

.message-type {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
}

.message-sent .message-type {
  background: rgba(255, 255, 255, 0.2);
}

.message-text {
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* 底部统计信息 */
.message-detail-footer {
  padding: 0;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0 0 20px 20px;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.message-stats {
  text-align: center;
  font-size: 12px;
  color: #666;
}

/* 空状态样式 */
.empty-messages {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.empty-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
}

.empty-hint {
  font-size: 14px;
  color: #999;
}

/* 错误状态样式 */
.error-messages {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.error-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.error-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
  color: #dc3545;
}

.error-details {
  font-size: 14px;
  color: #999;
  margin-bottom: 20px;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
  border-left: 4px solid #dc3545;
}

.retry-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: #c82333;
  transform: translateY(-1px);
}

/* 动画效果 */
@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动条美化 */
.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 480px) {
  /*
    .message-detail-header {
        padding: 12px 15px;
    }
    */

  .message-detail {
    max-width: 90%;
    padding: 0;
  }

  /* 附件消息需要更大的宽度来显示图片 */
  .message-detail[title='附件'] {
    max-width: 95% !important;
  }

  .message-detail[title='图片'] {
    max-width: 95% !important;
  }

  .message-avatar {
    width: 35px;
    height: 35px;
    font-size: 18px;
    margin: 0 8px;
  }

  .message-text {
    font-size: 14px;
  }

  .message-meta {
    font-size: 13px;
  }
}

/* 特殊消息类型样式 */
.message-detail[title*='系统'] {
  opacity: 0.8;
}

.message-detail[title*='重要'] .message-text {
  font-weight: 600;
}

.message-detail[title*='表情'] .message-text {
  font-size: 18px;
}

/* 长按菜单（预留） */
.message-detail:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* 加载状态 */
.messages-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #666;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 消息发送区域样式 */
.message-send-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 0;
  padding: 10px 12px;
  background: #f5f7fd;
  border: 1px solid #e0e0e0;
  position: relative;
  min-height: 50px;
}

.send-input-container {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
}

#message-send-input {
  width: 100%;
  min-height: 32px;
  max-height: 80px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 16px;
  font-size: 13px;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.3s ease;
  outline: none;
  background: #fff;
}

#message-send-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

#message-send-input::placeholder,
#message-detail-input::placeholder {
  color: #888;
}

.send-tools {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  position: absolute;
  top: 0;
  background: #f5f7fd;
  width: 100%;
  transform: translateY(-100%);
  left: 0;
  padding: 6px 8px;
  justify-content: center;
  border-radius: 8px 8px 0 0;
  border: 1px solid #e0e0e0;
  border-bottom: none;
}

#message-detail-input {
  max-height: 52px !important;
  max-height: 52px !important;
  background: #eee;
  border: none;
  color: #333;
  text-shadow: none;
}

.send-tool-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 6px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.send-tool-btn i {
  font-size: 14px;
  color: #dec1db;
}

.send-tool-btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
  transform: translateY(-1px);
}

.send-tool-btn:hover i {
  color: #c8a8c4;
}

.send-tool-btn:active {
  transform: translateY(0);
}

/* 工具切换按钮样式 */
.send-tool-toggle-btn {
  background: #88c2f4;
  border: 1px solid #6bb3f0;
  border-radius: 16px;
  padding: 6px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: white;
}

.send-tool-toggle-btn i {
  font-size: 14px;
  color: white;
}

.send-tool-toggle-btn:hover {
  background: #7ab8f1;
  border-color: #5da9ed;
  transform: translateY(-1px);
}

.send-tool-toggle-btn:active {
  transform: translateY(0);
}

.send-message-btn {
  background: #88c2f4;
  color: white;
  border: 1px solid #6bb3f0;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 6px 8px;
  flex-shrink: 0;
}

.send-message-btn i {
  font-size: 14px;
  color: white;
}

.send-message-btn:hover {
  background: #7ab8f1;
  border-color: #5da9ed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(136, 194, 244, 0.3);
}

.send-message-btn:active {
  transform: translateY(0);
}

.send-message-btn:disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 发送区域响应式设计 */
@media (max-width: 768px) {
  .message-send-area {
    padding: 8px 10px;
    gap: 6px;
    min-height: 45px;
  }

  .send-input-container {
    gap: 5px;
  }

  #message-send-input {
    min-height: 28px;
    max-height: 70px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .send-tools {
    gap: 4px;
    padding: 5px 6px;
  }

  .send-tool-btn {
    min-width: 28px;
    height: 28px;
    padding: 4px 6px;
  }

  .send-tool-btn i {
    font-size: 12px;
  }

  .send-tool-toggle-btn {
    min-width: 28px;
    height: 28px;
    padding: 4px 6px;
  }

  .send-tool-toggle-btn i {
    font-size: 12px;
  }

  .send-message-btn {
    height: 28px;
    min-width: 28px;
    padding: 4px 6px;
  }

  .send-message-btn i {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .message-send-area {
    padding: 6px 8px;
    gap: 4px;
    min-height: 40px;
  }

  .send-input-container {
    gap: 4px;
  }

  #message-send-input {
    min-height: 24px;
    max-height: 60px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .send-tools {
    gap: 3px;
    padding: 4px 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .send-tool-btn {
    min-width: 24px;
    height: 24px;
    padding: 3px 4px;
    border-radius: 12px;
  }

  .send-tool-btn i {
    font-size: 10px;
  }

  .send-tool-toggle-btn {
    min-width: 24px;
    height: 24px;
    padding: 3px 4px;
    border-radius: 12px;
  }

  .send-tool-toggle-btn i {
    font-size: 10px;
  }

  .send-message-btn {
    height: 24px;
    min-width: 24px;
    padding: 3px 4px;
    border-radius: 12px;
  }

  .send-message-btn i {
    font-size: 10px;
  }
}

/* 发送状态提示 */
.send-status-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  z-index: 10000;
  font-size: 14px;
  text-align: center;
  animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }

  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

.send-status-toast.success {
  background: #28a745;
}

.send-status-toast.error {
  background: #dc3545;
}

.send-status-toast.warning {
  background: #ffc107;
  color: #212529;
}

/* 输入框自动调整高度 */
#message-send-input {
  overflow-y: hidden;
}

/* 工具按钮激活状态 */
.send-tool-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* 发送按钮发送中状态 */
.send-message-btn.sending {
  background: #6c757d;
  cursor: not-allowed;
  pointer-events: none;
}

.send-message-btn.sending::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

/* 字数统计 */
.char-count {
  font-size: 12px;
  color: #999;
  text-align: right;
  margin-top: 4px;
  display: none !important;
}

.char-count.warning {
  color: #ffc107;
}

.char-count.error {
  color: #dc3545;
}

/* 特殊功能面板（预留） */
.special-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.special-panel-content {
  background: white;
  border-radius: 20px;
  padding: 20px;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
}

.message-sent .message-content,
.message-received .message-content {
  border-radius: 12px;
  padding: 12px;
}

.message-sent .message-content {
  background: #0099ff;
  color: #fff;
}

.message-received .message-content {
  background: #fff;
}

.message-sent .message-text,
.message-sent .message-meta {
  color: #fff;
}

.message-received .message-text,
.message-received .message-meta {
  color: #333;
}

/* 语音消息专用样式 */
.message-received[title='语音'],
.message-sent[title='语音'] {
  position: relative;
}

.message-received[title='语音'] > .message-content,
.message-sent[title='语音'] > .message-content {
  background: #65d6dd;
  border-radius: 18px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.message-received[title='语音'] > .message-content *,
.message-sent[title='语音'] > .message-content * {
  color: #fff;
}

.message-received[title='语音'] > .message-content .message-meta,
.message-sent[title='语音'] > .message-content .message-meta {
}

.message-received[title='语音'] > .message-content .message-text,
.message-sent[title='语音'] > .message-content .message-text {
  display: none;
  margin-bottom: 0 !important;
  margin-top: 10px !important;
  font-size: 16px !important;
}

.message-received[title='语音'] > .message-meta,
.message-sent[title='语音'] > .message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.message-received[title='语音'] > .message-meta .message-sender,
.message-sent[title='语音'] > .message-meta .message-sender {
  color: #2d5a2d;
  font-weight: 600;
}

.message-received[title='语音'] > .message-meta .message-type,
.message-sent[title='语音'] > .message-meta .message-type {
  background: linear-gradient(135deg, #4a9a4a 0%, #5cb85c 100%);
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-received[title='语音'] > .message-meta .message-type::before,
.message-sent[title='语音'] > .message-meta .message-type::before {
  content: '🎤';
  font-size: 12px;
}

/* 语音控制区域 */
.message-received[title='语音'] .voice-control,
.message-sent[title='语音'] .voice-control {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.message-received[title='语音'] .voice-play-btn,
.message-sent[title='语音'] .voice-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: url(../../mobile/images/bf.png) no-repeat center center;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  color: #999;
  background-size: 100% 100%;
}

.message-received[title='语音'] .voice-play-btn.playing,
.message-sent[title='语音'] .voice-play-btn.playing {
  animation: voicePulse 1.5s ease-in-out infinite;
}

.message-received[title='语音'] .voice-play-btn.playing::after,
.message-sent[title='语音'] .voice-play-btn.playing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  animation: voiceShimmer 2s linear infinite;
}

.message-received[title='语音'] .voice-duration,
.message-sent[title='语音'] .voice-duration {
  color: #4a9a4a;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 语音波形动画 */
.message-received[title='语音'] .voice-waveform,
.message-sent[title='语音'] .voice-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  margin-left: 6px;
}

.message-received[title='语音'] .voice-waveform .wave-bar,
.message-sent[title='语音'] .voice-waveform .wave-bar {
  width: 3px;
  background: #fff;
  border-radius: 2px;
}

.voice-status {
  display: none !important;
}

.message-received[title='语音'] .voice-waveform .wave-bar:nth-child(1),
.message-sent[title='语音'] .voice-waveform .wave-bar:nth-child(1) {
  height: 8px;
}

.message-received[title='语音'] .voice-waveform .wave-bar:nth-child(2),
.message-sent[title='语音'] .voice-waveform .wave-bar:nth-child(2) {
  height: 16px;
}

.message-received[title='语音'] .voice-waveform .wave-bar:nth-child(3),
.message-sent[title='语音'] .voice-waveform .wave-bar:nth-child(3) {
  height: 12px;
}

.message-received[title='语音'] .voice-waveform .wave-bar:nth-child(4),
.message-sent[title='语音'] .voice-waveform .wave-bar:nth-child(4) {
  height: 18px;
}

.message-received[title='语音'] .voice-waveform .wave-bar:nth-child(5),
.message-sent[title='语音'] .voice-waveform .wave-bar:nth-child(5) {
  height: 10px;
}

.message-received[title='语音'] .voice-waveform .wave-bar:nth-child(6),
.message-sent[title='语音'] .voice-waveform .wave-bar:nth-child(6) {
  height: 14px;
}

.message-received[title='语音'] .voice-waveform .wave-bar:nth-child(7),
.message-sent[title='语音'] .voice-waveform .wave-bar:nth-child(7) {
  height: 6px;
}

/* 语音转文字区域 */
.message-received[title='语音'] > .message-text,
.message-sent[title='语音'] > .message-text {
  background: rgba(74, 154, 74, 0.1);
  border: 1px dashed #4a9a4a;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  color: #2d5a2d;
  font-size: 13px;
  line-height: 1.5;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  position: relative;
}

.message-received[title='语音'] > .message-meta,
.message-sent[title='语音'] > .message-meta {
  display: none !important;
}

.message-received[title='语音'] > .message-text.visible,
.message-sent[title='语音'] > .message-text.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.message-received[title='语音'] > .message-text::before,
.message-sent[title='语音'] > .message-text::before {
  content: '💬 转文字: ';
  color: #4a9a4a;
  font-weight: 600;
  font-size: 11px;
}

/* 流式传输效果 */
.message-received[title='语音'] > .message-text.streaming,
.message-sent[title='语音'] > .message-text.streaming {
  overflow: hidden;
}

.message-received[title='语音'] > .message-text.streaming::after,
.message-sent[title='语音'] > .message-text.streaming::after {
  content: '|';
  animation: blink 1s infinite;
  color: #4a9a4a;
  font-weight: bold;
}

/* 动画定义 */
@keyframes voicePulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(74, 154, 74, 0.4);
  }
}

@keyframes voiceShimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes waveAnimation {
  0%,
  100% {
    transform: scaleY(1);
    opacity: 0.7;
  }

  50% {
    transform: scaleY(1.5);
    opacity: 1;
  }
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* 语音状态指示器 */
.message-received[title='语音'] .voice-status,
.message-sent[title='语音'] .voice-status {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5cb85c;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.message-received[title='语音'] .voice-content.playing .voice-status,
.message-sent[title='语音'] .voice-content.playing .voice-status {
  opacity: 1;
  transform: scale(1);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* 语音内容区域 */
.message-received[title='语音'] .voice-content,
.message-sent[title='语音'] .voice-content {
  position: relative;
}

/* 触摸反馈 */

.message-type {
  display: none !important;
}

/* 红包消息专用样式 */
.message-received[title='红包'],
.message-sent[title='红包'] {
  position: relative;
}

.message-received[title='红包'] > .message-content,
.message-sent[title='红包'] > .message-content {
  background: #00aafc url(../../mobile/images/zz.png) no-repeat center left 14px;
  border: 1px solid #00aafc;
  border-radius: 18px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  position: relative !important;
  box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
  display: flex;
  flex-direction: column;
  background-size: 30px 30px;
  padding-left: 52px;
  margin-top: 14px;
}

.message-received[title='红包'] > .message-content::before,
.message-sent[title='红包'] > .message-content::before {
}

.message-received[title='红包'] > .message-content:active,
.message-sent[title='红包'] > .message-content:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(229, 62, 62, 0.5);
}

.message-received[title='红包'] > .message-meta,
.message-sent[title='红包'] > .message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.message-received[title='红包'] > .message-meta .message-sender,
.message-sent[title='红包'] > .message-meta .message-sender {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 13px;
}

.message-received[title='红包'] > .message-meta .message-type,
.message-sent[title='红包'] > .message-meta .message-type {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(10px);
}

.message-received[title='红包'] > .message-meta .message-type::before,
.message-sent[title='红包'] > .message-meta .message-type::before {
  content: '🧧';
  font-size: 12px;
}

/* 红包主体内容 - 使用现有的message-text结构 */
.message-received[title='红包'] > .message-text,
.message-sent[title='红包'] > .message-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 8px;
  text-align: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  padding-top: 45px;
  min-height: 60px;
}

/* 金额显示，在文本前添加¥符号 */
.message-received[title='红包'] > .message-text::before,
.message-sent[title='红包'] > .message-text::before {
  content: '¥';
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 红包祝福语 */
.message-received[title='红包'] > .message-text::after,
.message-sent[title='红包'] > .message-text::after {
  content: '恭喜发财，大吉大利';
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
  text-shadow: none;
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* 红包装饰元素 */
.message-received[title='红包'] > .message-content::after,
.message-sent[title='红包'] > .message-content::after {
}

/* 红包状态效果 */
.message-received[title='红包'] .redpacket-status,
.message-sent[title='红包'] .redpacket-status {
  position: absolute;
  top: 5px;
  right: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

/* 动画效果 */
@keyframes redPacketShimmer {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

@keyframes redPacketFloat {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-3px);
  }
}

/* 红包打开效果 */
.message-received[title='红包'] > .message-content.opened,
.message-sent[title='红包'] > .message-content.opened {
  background: linear-gradient(135deg, #fbd38d 0%, #f6ad55 50%, #ed8936 100%);
  border-color: #ed8936;
}

.message-received[title='红包'] > .message-content.opened .redpacket-amount,
.message-sent[title='红包'] > .message-content.opened .redpacket-amount {
  animation: amountPulse 0.6s ease-out;
}

@keyframes amountPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* 红包领取提示 - 使用after伪元素 */
.message-received[title='红包'] > .message-content::after,
.message-sent[title='红包'] > .message-content::after {
}

.message-received[title='红包'] > .message-content:hover::after,
.message-sent[title='红包'] > .message-content:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* 红包打开后的提示 */
.message-received[title='红包'] > .message-content.opened::after,
.message-sent[title='红包'] > .message-content.opened::after {
  content: '红包已被领取';
  background: rgba(74, 154, 74, 0.8);
}

/* 响应式适配 */
@media (max-width: 480px) {
  .message-received[title='红包'] > .message-content,
  .message-sent[title='红包'] > .message-content {
    min-width: 160px;
  }

  .message-received[title='红包'] > .message-content::before,
  .message-sent[title='红包'] > .message-content::before {
  }

  .message-received[title='红包'] > .message-text,
  .message-sent[title='红包'] > .message-text {
    font-size: 20px;
    padding-top: 40px;
  }

  .message-received[title='红包'] > .message-text::before,
  .message-sent[title='红包'] > .message-text::before {
    font-size: 16px;
    left: -15px;
  }
  .message-sent .message-content,
  .message-received .message-content {
    padding: 8px 12px;
  }
}

/* 红包粒子效果（点击时） */
.redpacket-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

.redpacket-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffd700;
  border-radius: 50%;
  animation: particleFloat 1s ease-out forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.3);
  }
}

.message-received[title='红包'] *,
.message-sent[title='红包'] * {
  color: #fff !important;
  order: 2;
  position: unset !important;
}

.member-count {
  display: none !important;
  order: 2;
}

/* 删除群聊页面样式 - 确保在message-renderer中也能正确显示 */
.delete-group-content {
  padding: 0 20px 20px 20px;
}

.delete-group-content .group-avatar {
  display: flex !important;
  /* 在删除群聊页面强制显示群聊头像 */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.delete-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 15px;
  background: #fff3cd;
  border-radius: 12px;
  border: 1px solid #ffeaa7;
}

.delete-group-header .delete-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #856404;
  font-weight: 500;
}

.delete-group-header .delete-icon {
  font-size: 16px;
}

.refresh-group-list {
  padding: 8px 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.refresh-group-list:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.refresh-icon {
  font-size: 14px;
}

.delete-group-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.delete-group-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 15px;
  background: white;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  flex-direction: column;
}

.delete-group-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.group-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.group-details {
  flex: 1;
  min-width: 0;
}

.group-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-id {
  font-size: 14px;
  color: #666;
  margin-bottom: 2px;
}

.group-members {
  font-size: 13px;
  color: #888;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-time {
  font-size: 12px;
  color: #999;
}

.delete-group-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 10px;
}

.delete-group-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #d63031 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.delete-group-btn:active {
  transform: translateY(0);
}

.delete-group-btn .delete-icon {
  font-size: 16px;
}

.delete-group-tips {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
}

.delete-group-tips .tip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
}

.delete-group-tips .tip-item:last-child {
  margin-bottom: 0;
}

.delete-group-tips .tip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

/* 响应式设计 - 删除群聊 */
@media (max-width: 480px) {
  .delete-group-content {
    padding: 0 15px 15px 15px;
  }

  .delete-group-header {
    padding: 12px;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .delete-group-header .delete-info {
    justify-content: center;
  }

  .refresh-group-list {
    align-self: center;
    padding: 10px 16px;
  }

  .delete-group-item {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .group-info {
    align-items: flex-start;
  }

  .delete-group-content .group-avatar {
    width: 45px !important;
    height: 45px !important;
    font-size: 22px !important;
  }

  .group-name {
    font-size: 15px;
  }

  .group-id {
    font-size: 13px;
  }

  .group-members {
    font-size: 12px;
  }

  .group-time {
    font-size: 11px;
  }

  .delete-group-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
  }

  .delete-group-tips {
    padding: 12px;
  }

  .delete-group-tips .tip-item {
    font-size: 12px;
  }
}

/* 覆盖特殊消息类型的sender定位，使用新的布局结构 */
.message-received[title='红包'] .message-sender,
.message-sent[title='红包'] .message-sender,
.message-received[title='语音'] .message-sender,
.message-received[title='表情包'] .message-sender {
  font-size: 12px;
  color: #666 !important;
  /* 移除绝对定位，使用新的布局结构 */
  position: static !important;
  order: unset;
  top: unset;
  left: unset;
  margin-bottom: 4px;
  margin-left: 10px;
}

.message-received[title='红包'] .message-text,
.message-sent[title='红包'] .message-text {
  order: 1;
  font-size: 16px;
  margin-bottom: 0;
  padding-left: 40px;
}

.message-received[title='红包'] .message-text:after,
.message-sent[title='红包'] .message-text:after {
  content: '已转入好友余额';
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  font-weight: normal;
  margin-bottom: 0;
}

.message-received[title='红包'] .message-text::before,
.message-sent[title='红包'] .message-text::before {
  content: '￥';
  font-size: 16px;
  color: #fff;
  font-weight: normal;
}

/* 语音输入面板样式 */
#voice-input-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

#voice-input-panel .special-panel-content {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

#voice-content-input {
  transition: all 0.3s ease !important;
}

#voice-content-input:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  transform: translateY(-1px);
}

#voice-send-confirm-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

#voice-send-confirm-btn:active {
  transform: translateY(0);
}

/* 红包输入面板样式 */
#redpack-input-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

#redpack-input-panel .special-panel-content {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

#redpack-amount-input,
#redpack-message-input {
  transition: all 0.3s ease !important;
}

#redpack-amount-input:focus,
#redpack-message-input:focus {
  border-color: #ff6b6b !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
  transform: translateY(-1px);
}

#redpack-send-confirm-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #d63031 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

#redpack-send-confirm-btn:active {
  transform: translateY(0);
}

#redpack-amount-display {
  font-weight: 600;
  font-size: 14px;
}

/* 动画定义 */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* 响应式设计 */
@media (max-width: 480px) {
  #voice-input-panel .special-panel-content,
  #redpack-input-panel .special-panel-content {
    margin: 15px;
    padding: 20px;
    max-width: calc(100vw - 30px) !important;
    width: auto !important;
  }

  #voice-content-input {
    min-height: 70px !important;
    font-size: 16px !important;
    /* 防止 iOS 放大 */
  }

  #redpack-amount-input,
  #redpack-message-input {
    font-size: 16px !important;
    /* 防止 iOS 放大 */
  }
}

/* 表情包输入面板样式 */
#sticker-input-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

#sticker-input-panel .special-panel-content {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

/* 表情包网格样式 */
.sticker-item {
  transition: all 0.3s ease !important;
}

.sticker-item:hover {
  background: rgba(102, 126, 234, 0.1) !important;
  transform: scale(1.1) !important;
  border-color: #667eea !important;
}

.sticker-item:active {
  transform: scale(0.95) !important;
}

/* 表情包图片样式 */
.qq-sticker-image {
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qq-sticker-image:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: scale(1.02);
}

/* 表情包消息特殊样式 */
.message-detail[title='表情包'] .message-content {
  padding: 8px !important;
  background: transparent !important;
  border: none !important;
}

.message-detail[title='表情包'] .qq-sticker-image {
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.message-detail[title='表情包'] .qq-sticker-image:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transform: scale(1.05);
}

/* 附件图片样式 - 响应式设计 */
.attachment-image {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  margin: 4px 0;
  cursor: pointer;
  object-fit: contain;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.attachment-image:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 附件消息内容容器 */
.attachment-message-content {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.image-message-content {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.sticker-item img {
    width:100% !important;
    height: auto !important;
  }
/* 响应式设计 */
@media (max-width: 480px) {
  #sticker-input-panel .special-panel-content {
    margin: 15px;
    padding: 20px;
    max-width: calc(100vw - 30px) !important;
    width: auto !important;
  }



  .message-detail[title='表情包'] .qq-sticker-image {
    max-width: 120px !important;
    max-height: 120px !important;
  }

  /* 手机端附件图片响应式 */
  .attachment-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 2px 0 !important;
  }

  .attachment-message-content,
  .image-message-content {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.group-badge {
  display: none !important;
}
/* 覆盖语音和表情包消息的sender特殊定位 */
.message-received[title='语音'] .message-sender {
  /* 移除特殊定位，使用新的布局结构 */
  top: unset;
  left: unset;
  word-break: keep-all;
  position: static !important;
  margin-bottom: 4px;
  margin-left: 10px;
}
.message-received[title='表情包'] .message-sender {
  word-break: keep-all;
  /* 移除特殊定位，使用新的布局结构 */
  top: unset;
  position: static !important;
  margin-bottom: 4px;
  margin-left: 10px;
}
/*
 * =========================================
 *  吱事鼠条——水滴气泡（蓝）
 * =========================================
 */

/* 改色都在这一栏，其他不用管 */
:root {
  /* 发送方 (您) 气泡 - 显示在右侧 */
  --sent-bubble-bg: rgba(210, 240, 255, 0.6); /* 背景色 */
  --sent-bubble-border: rgba(168, 192, 204, 1); /* 边框色 */
  --sent-bubble-font-color: #000000 !important; /* 字体颜色 */
  --sent-bubble-font-size: 15px; /* 字体大小 */

  /* 接收方 (角色) 气泡 - 显示在左侧 */
  --received-bubble-bg: rgba(210, 240, 255, 0.6); /* 背景色 */
  --received-bubble-border: rgba(168, 192, 204, 1); /* 边框色 */
  --received-bubble-font-color: #000000 !important; /* 字体颜色 */
  --received-bubble-font-size: 15px; /* 字体大小 */
}

.message-content {
  padding: 8px 12px !important; /* 从10px 14px减少到8px 12px，使气泡更窄 */
  border-radius: 24px !important;
  line-height: 1.4; /* 从1.5减少到1.4，使行高更紧凑 */
  word-wrap: break-word;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.message-sent .message-content {
  background-color: var(--sent-bubble-bg) !important;
  border: 1px solid var(--sent-bubble-border) !important;
  color: var(--sent-bubble-font-color) !important;
  font-size: var(--sent-bubble-font-size);
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), -2px -2px 4px rgba(255, 255, 255, 0.3),
    inset 6px 6px 8px rgba(0, 0, 0, 0.1), inset -6px -6px 8px rgba(255, 255, 255, 0.5) !important;
}

.message-sent .message-content::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: auto;
  width: 12px;
  height: 6px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.9) 40%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 0.6) 100%
  );
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.9;
  z-index: 2;
  transform: rotate(-45deg);
}

.message-sent .message-content::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 5px;
  right: auto;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  z-index: 2;
}

.message-sent .message-content:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.18), -3px -3px 6px rgba(255, 255, 255, 0.6),
    inset 6px 6px 8px rgba(0, 0, 0, 0.15), inset -6px -6px 8px rgba(255, 255, 255, 0.9) !important;
}

.message-received .message-content {
  background-color: var(--received-bubble-bg) !important;
  border: 1px solid var(--received-bubble-border) !important;
  color: var(--received-bubble-font-color) !important;
  font-size: var(--received-bubble-font-size);
  box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.1), 2px -2px 4px rgba(255, 255, 255, 0.3),
    inset -6px 6px 8px rgba(0, 0, 0, 0.1), inset 6px -6px 8px rgba(255, 255, 255, 0.5) !important;
}

.message-received .message-content::before {
  content: '';
  position: absolute;
  top: 5px;
  left: auto;
  right: 5px;
  width: 12px;
  height: 6px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.9) 40%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 0.6) 100%
  );
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.9;
  z-index: 2;
  transform: rotate(45deg);
}
.message-received .message-content::after {
  content: '';
  position: absolute;
  top: 15px;
  left: auto;
  right: 5px;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  z-index: 2;
}

.message-received .message-content:hover {
  transform: translateY(-2px);
  box-shadow: -6px 6px 12px rgba(0, 0, 0, 0.18), 3px -3px 6px rgba(255, 255, 255, 0.6),
    inset -6px 6px 8px rgba(0, 0, 0, 0.15), inset 6px -6px 8px rgba(255, 255, 255, 0.9) !important;
}

.message-received[title='语音'] .voice-waveform .wave-bar,
.message-sent[title='语音'] .voice-waveform .wave-bar {
  background: #000 !important;
}
.message-received[title='语音'] > .message-content *,
.message-sent[title='语音'] > .message-content * {
  color: #000 !important;
}
.message-detail[title='表情包'] .message-content {
  box-shadow: none !important;
}
.message-sent .message-text,
.message-sent .message-meta,
.message-received[title='语音'] > .message-content *,
.message-sent[title='语音'] > .message-content * {
  color: #333 !important;
}
.message-received[title='红包'] .message-text:after,
.message-sent[title='红包'] .message-text:after,
.message-received[title='红包'] .message-text::before,
.message-sent[title='红包'] .message-text::before,
.message-received[title='红包'] .message-text,
.message-sent[title='红包'] .message-text {
  color: #333 !important;
}
.delete-group-content{padding-top: 10px;}
